import { http } from '@/utils/http/axios';

export interface Redpacket {
  chanID: string;
  /**
   * FILTERALL 或 FILTERWHERE
   */
  filterType: string;
  pageSize: number;
  roleID: string;
  serveID: string;
  startPos: number;
}

export interface RedpacketUpdate {
  chanId: string;
  createTime: string;
  existMoeny: number;
  id: number;
  isAllowReflect: string;
  isGiving: string;
  moneyList: string;
  redType: string;
  remainMoney: number;
  roleId: string;
  roleLevelChange: number;
  serveId: string;
  sillMoeny: number;
  totalOnline: number;
  typeThreshold: string;
  updateTime: string;
  wealthLevel: string;
  wealthPoint: number;
  yetThreshold: number;
}

/**
 * 查询接口阐述
 */
export function getRedpacketPlayerPageList(params: Redpacket) {
  return http.request({
    url: '/system/red/player/list',
    method: 'POST',
    params,
  });
}

/**
 * 修改状态
 * @param params
 */
export function updateRedpacket(params: RedpacketUpdate) {
  return http.request({
    url: '/system/red/player/update',
    method: 'POST',
    params,
  });
}

/**
 * 获取红包配置
 */
export function getRedpackConfig() {
  return http.request({
    url: '/system/red/config',
    method: 'GET',
  });
}

/**
 * 修改红包配置
 * @param params
 */
export function updateRedpackConfig(params: any) {
  return http.request({
    url: '/system/red/config/update',
    method: 'POST',
    params,
  });
}

/**
 * 主播福利列表
 * @param params
 */
 export function getAnchorHbList(params) {
  return http.request({
    url: '/system/anchorRedArrs',
    method: 'POST',
    params,
  });
}
/**
 * 主播福利领取明细
 * @param params
 */
 export function getAnchorHbDetail(params) {
  return http.request({
    url: '/system/anchorRedDetail',
    method: 'POST',
    params,
  });
}